using System;
using System.Runtime.Serialization;

namespace Director.DomainModels
{
	[DataContract]
	public class Candle
	{
		internal Candle(StockSharp.Transaq.Native.Responses.TransaqCandle candle)
		{
			Date = candle.Date;
			Open = candle.Open;
			High = candle.High;
			Low = candle.Low;
			Close = candle.Close;
			Oi = candle.Oi;
			Volume = candle.Volume;
		}

		internal Candle(DateTime date, decimal open, decimal high, decimal low, decimal close, int volume, int oi)
		{
			Date = date;
			Open = open;
			High = high;
			Low = low;
			Close = close;
			Oi = oi;
			Volume = volume;
		}

		[DataMember]
		public int Oi { get; set; }

		[DataMember]
		public int Volume { get; set; }

		[DataMember]
		public decimal Close { get; set; }

		[DataMember]
		public decimal Low { get; set; }

		[DataMember]
		public decimal High { get; set; }

		[DataMember]
		public decimal Open { get; set; }

		[DataMember]
		public DateTime Date { get; set; }
	}
}